package ecoll.client.database;

import java.io.Serializable;
import java.util.Date;

@SuppressWarnings("serial")
public class File implements Serializable {

	private long id;
	private String name;
	private String blobKey;
	private long size;
	private long date;
	private String rights;

	public File() {
	}

	public File(long id, String name, String blobKey, long size, Date date,
			String rights) {
		setId(id);
		setName(name);
		setBlobKey(blobKey);
		setSize(size);
		setDate(date);
		setRights(rights);
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getBlobKey() {
		return blobKey;
	}

	public void setBlobKey(String blobKey) {
		this.blobKey = blobKey;
	}

	public long getSize() {
		return size;
	}

	public void setSize(long size) {
		this.size = size;
	}

	public Date getDate() {
		return new Date(date);
	}

	public void setDate(Date date) {
		this.date = date.getTime();
	}

	public String getRights() {
		return rights;
	}

	public void setRights(String rights) {
		this.rights = rights;
	}

}
